guint info,
guint time)
{
- GtkClipboard *clipboard = gtk_widget_get_clipboard (widget, selection_data->selection);
+ GtkClipboard *clipboard;
+
+ clipboard = gtk_widget_get_clipboard (widget,
+ gtk_selection_data_get_selection (selection_data));
if (clipboard && clipboard->get_func)
clipboard->get_func (clipboard, selection_data, info, clipboard->user_data);
{
RequestContentsInfo *request_info = get_request_contents_info (widget);
set_request_contents_info (widget, NULL);
-
- request_info->callback (gtk_widget_get_clipboard (widget, selection_data->selection),
+
+ request_info->callback (gtk_widget_get_clipboard (widget, gtk_selection_data_get_selection (selection_data)),
selection_data,
request_info->user_data);
* if we asked for compound_text and didn't get it, try string;
* If we asked for anything else and didn't get it, give up.
*/
- if (selection_data->target == gdk_atom_intern_static_string ("UTF8_STRING"))
+ GdkAtom target = gtk_selection_data_get_target (selection_data);
+
+ if (target == gdk_atom_intern_static_string ("UTF8_STRING"))
{
gtk_clipboard_request_contents (clipboard,
gdk_atom_intern_static_string ("COMPOUND_TEXT"),
request_text_received_func, info);
return;
}
- else if (selection_data->target == gdk_atom_intern_static_string ("COMPOUND_TEXT"))
+ else if (target == gdk_atom_intern_static_string ("COMPOUND_TEXT"))
{
gtk_clipboard_request_contents (clipboard,
GDK_TARGET_STRING,
guint8 *result = NULL;
gsize length = 0;
- result = selection_data->data;
- length = selection_data->length;
+ result = (guint8 *) gtk_selection_data_get_data (selection_data);
+ length = gtk_selection_data_get_length (selection_data);
info->current_atom++;
return;
}
- info->callback (clipboard, selection_data->target, result, length,
+ info->callback (clipboard, gtk_selection_data_get_target (selection_data),
+ result, length,
info->user_data);
g_free (info->atoms);
g_free (info);
* if we asked for image/gif and didn't get it, try image/bmp;
* If we asked for anything else and didn't get it, give up.
*/
- if (selection_data->target == gdk_atom_intern_static_string ("image/png"))
+ GdkAtom target = gtk_selection_data_get_target (selection_data);
+
+ if (target == gdk_atom_intern_static_string ("image/png"))
{
gtk_clipboard_request_contents (clipboard,
gdk_atom_intern_static_string ("image/jpeg"),
request_image_received_func, info);
return;
}
- else if (selection_data->target == gdk_atom_intern_static_string ("image/jpeg"))
+ else if (target == gdk_atom_intern_static_string ("image/jpeg"))
{
gtk_clipboard_request_contents (clipboard,
gdk_atom_intern_static_string ("image/gif"),
request_image_received_func, info);
return;
}
- else if (selection_data->target == gdk_atom_intern_static_string ("image/gif"))
+ else if (target == gdk_atom_intern_static_string ("image/gif"))
{
gtk_clipboard_request_contents (clipboard,
gdk_atom_intern_static_string ("image/bmp"),
{
WaitResults *results = data;
- if (selection_data->length >= 0)
+ if (gtk_selection_data_get_length (selection_data) >= 0)
results->data = gtk_selection_data_copy (selection_data);
g_main_loop_quit (results->loop);